<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"><title>模板组表</title>
<head th:replace="system/inc/incHead::incHead"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content no-padding">
    <form id="pagerForm" action="/biz/template/group" method="get">
        <input type="hidden" id="pageNum" name="pageNum" value="1"/>
        <input type="hidden" name="numPerPage" th:value="${page?.numPerPage}"/>
        <input type="hidden" name="orderField" th:value="${orderField}"/>
        <input type="hidden" name="orderDirection" th:value="${orderDirection}"/>
        <div class="ibox no-margins no-padding no-borders">
            <div class="ibox-title no-margins no-padding no-borders">
                <div class="row p-xs ljRowSearch">
                    <div class="form-group col-md-2">
                        <div class="input-group m-l-sm">
                            <span class="input-group-addon">模板组名称:</span>
                            <input name="groupName" type="text" class="form-control input-sm" th:value="${groupName}">
                        </div>
                    </div>
                    <div class="form-group col-md-2">
                        <div class="input-group m-l-sm">
                            <span class="input-group-addon">数据状态:</span>
                            <select name="dataStatus" data-placeholder="请选择数据状态" class="form-control chosen-select required" style="width:100%;">
                                <option value="" th:selected="${dataStatus} == null">--请选择数据状态--</option>
                                <option th:each="item:${@lj.group('DataStatus')}" th:value="${item.codeKey}" th:selected="${dataStatus} == ${item.codeKey}">[[${item.codeKey}]].[[${item .codeValue}]]
                                </option>
                            </select>
                        </div>
                    </div>
                    <button class="btn btn-success btn-sm pull-right btnPagerForm" type="button"><i class="fa fa-search">重新检索</i></button>
                </div>
            </div>
        </div>
    </form>
    <div class="ibox no-margins">
        <div class="ibox-title ljIboxTitle">
            <a th:if="${@lj.limit('BizTemplateGroupAdd')}>0" ljUrl="/biz/template/group/add" class="btn btn-xs btn-success" title="模板组表新增" target="ljOpenCon" ljWidth="600px" ljHeight="400px">
                <i class="fa fa-paste">新增</i>
            </a>
            <a th:if="${@lj.limit('SysPageConfigEdit')}>0" class="btn btn-xs btn-warning pull-right SysPageConfigEditBtn" href="javascript:" title="页面配置" pageCode="BizTemplateGroup">
                <i class="fa fa-paste">页面配置</i>
            </a>
        </div>
        <div class="ibox-content p-xs ljScrollbar3" style="overflow:auto;" layoutH="145">
            <table id="listTable" class="table table-striped table-bordered table-hover table-responsive lj-table-nowrap no-margins dataTable">
                <thead>
                <tr>
                    <th spf="自增编号" style="min-width:100px;">自增编号</th>
                    <th spf="模板组名称" style="min-width:100px;">模板组名称</th>
                    <th spf="数据状态" style="min-width:100px;">数据状态</th>
                    <th spf="创建时间" style="min-width:100px;">创建时间</th>
                    <th spf="操作管理" style="min-width:100px;">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item:${records}" th:tid="${item.id}" class="warning ljTr" style="display: none">
                    <td spf="自增编号" style="min-width:100px;" th:text="${item.id}"></td>
                    <td spf="模板组名称" style="min-width:100px;" th:text="${item.groupName}"></td>
                    <td spf="数据状态" style="min-width:100px;" th:utext="${@lj.codeStyle('dataStatus',item.dataStatus)}"></td>
                    <td spf="创建时间" style="min-width:100px;" th:utext="${@lj.date(item.createTime)}"></td>
                    <td spf="操作管理" style="min-width:100px;">
                        <div th:if="${@lj.limit('BizTemplateGroupEdit')}>0" th:ljUrl="|/biz/template/group/edit?id=${item.id}|" class="btn btn-xs btn-primary" title="编辑模板组表" target="ljOpenCon"
                             ljWidth="600px" ljHeight="400px">
                            <i class="fa fa-paste">编辑</i>
                        </div>
                        <div th:if="${@lj.limit('BizTemplateGroupDel')}>0" th:ljUrl="|/biz/template/group/del?id=${item.id}|" class="btn btn-xs btn-danger" title="是否确定删除该记录?" target="ljAjaxTodo">
                            <i class="fa fa-paste">删除</i>
                        </div>
                        <div th:if="${@lj.limit('BizTemplateGroupDetail')}>0" th:ljUrl="|/biz/template/group/detail?id=${item.id}|" class="btn btn-xs btn-success" title="模板组表详情" target="ljOpenCon"
                             ljWidth="600px" ljHeight="400px">
                            <i class="fa fa-paste">详情</i>
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div th:replace="system/inc/incBottom::incBottom"></div>
<div th:replace="system/inc/incPage::incPage"></div>
<script type="text/javascript" th:inline="javascript">
    /*<![CDATA[*/
    jQuery(function ($) {
        $(".chosen-select").chosen();
        let showFields = [[${showFields}]];
        if (showFields != '') {
            showFields = "," + showFields + ",";
            $(".SysPageConfigEditTable th").each(function () {
                var spf = $(this).attr("spf");
                if (showFields.indexOf("," + spf + ",") < 0) {
                    $("[spf='" + spf + "']").hide();
                }
            });
        }
        $("tr").show();
    });
    /*]]>*/
</script>
</body>
</html>